<%@ page language="java"  pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/j.tld" prefix="j" %>
<%@ page isELIgnored="false" %> <!-- 不加会导致EL失效 -->
<!DOCTYPE html>
<html class="bg-black">
	<%@ include file="header_login.jsp" %>
	
    <body class="bg-black">

        <div class="form-box" id="login-box">
            <div class="header"><j:i18n key="admin.login.welcomme"/> &nbsp; <j:i18n key="admin.common.systemName"/></div>
            <form class="required-validate" id="form1" action="doLogin" method="post" onsubmit="return validForm(this)">
                <div class="body bg-gray">
                    <div class="form-group">
                        <input type="text" id="loginName" name="loginName" 
                        	class="form-control required" 
                        	value="${user}"
                        	placeholder='<j:i18n key="admin.login.name"/>'/>
                    </div>
                    <div class="form-group">
                        <input type="password" id="password" name="password" 
                        class="form-control required"
						value="${password}"
                        placeholder='<j:i18n key="admin.login.password"/>'/>
                    </div>          
                    <div class="form-group">
                        <input type="checkbox" name="remember_me"/> <j:i18n key="admin.login.rememberMe"/>
                    </div>
                    
                    <c:if test="${empty errMsg}">  <!-- </c:if>  
                    <div class="form-group">
                    	<img div style="margin:5px" class="vcode" src="randomCode">
                    	<input type="hidden" name="needRandom" value="1">
                        <input type="text" class="form-control required" name="inputRandomCode" placeholder='<j:i18n key="admin.login.randomCode"/>'/>
                    </div>
                    <c:if test="${empty errMsg}">  --> </c:if>  
                                        
                </div>
                <div class="footer">                                                               
                    <button type="submit" class="btn bg-olive btn-block"><j:i18n key="admin.login.submit"/></button> 
                    <c:if test="${!empty errMsg }"><div><span>${errMsg }</span></div></c:if> 
                    <j:nav label="name"/>
                </div>
            </form>
        </div>



    </body>

<script type="text/javascript">

function validForm(form){
	var $form = $(form);
	if (!$form.valid()){
		return false;
	}
}

</script>

</html>